
package com.shop.cloud.mall.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 签到记录
 *
 * @author 
 * @date 2021-01-13 15:29:30
 */
@Data
@TableName("sign_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "签到记录")
public class SignRecord extends Model<SignRecord> {
    private static final long serialVersionUID=1L;

    /**
     * PK
     */
    @TableId(type = IdType.ASSIGN_ID)
    @NotNull(message = "PK不能为空")
    @Schema(description = "PK")
    private String id;
    /**
     * 所属租户
     */
    @NotNull(message = "所属租户不能为空")
    @Schema(description = "所属租户")
    private String tenantId;
    /**
     * 逻辑删除标记（0：显示；1：隐藏）
     */
    @NotNull(message = "逻辑删除标记（0：显示；1：隐藏）不能为空")
    @Schema(description = "逻辑删除标记（0：显示；1：隐藏）")
    private String delFlag;
    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    /**
     * 最后更新（签到）时间
     */
    @NotNull(message = "最后更新（签到）时间不能为空")
    @Schema(description = "最后更新（签到）时间")
    private LocalDateTime updateTime;
    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户ID")
    private String userId;
    /**
     * 连续天数
     */
    @NotNull(message = "连续天数不能为空")
    @Schema(description = "连续天数")
    private Integer continuDays;
    /**
     * 累计天数
     */
    @NotNull(message = "累计天数不能为空")
    @Schema(description = "累计天数")
    private Integer cumulateDays;

	@TableField(exist = false)
	private UserInfo userInfo;
}
